import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {RouteReuseStrategy} from '@angular/router';
import {IonicModule, IonicRouteStrategy} from '@ionic/angular';
import {SplashScreen} from '@ionic-native/splash-screen/ngx';
import {StatusBar} from '@ionic-native/status-bar/ngx';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {IonicStorageModule} from '@ionic/storage';
import {StoreModule} from '@ngrx/store';
import {metaReducers, reducers} from './reducers';
import {HttpClientModule} from '@angular/common/http';
import {WebView} from '@ionic-native/ionic-webview/ngx';
import {Camera} from '@ionic-native/camera/ngx';
import {File} from '@ionic-native/file/ngx';
import {FileTransfer} from '@ionic-native/file-transfer/ngx';
import {FilePath} from '@ionic-native/file-path/ngx';
import {FileOpener} from '@ionic-native/file-opener/ngx';
import {ComponentsModule} from './components/components.module';
import {AppVersion} from '@ionic-native/app-version/ngx';
import {InAppBrowser} from '@ionic-native/in-app-browser/ngx';
import {Network} from '@ionic-native/network/ngx';
import {AppMinimize} from '@ionic-native/app-minimize/ngx';

@NgModule({
  declarations: [
    AppComponent
  ],
  entryComponents: [],
  imports: [
    BrowserModule,
    IonicModule.forRoot({
      mode: 'md',
      backButtonIcon: 'ios-arrow-back',
      backButtonText: '',
      menuIcon: 'md-list',
      menuType: 'reveal'
    }),
    AppRoutingModule,
    IonicStorageModule.forRoot({
      name: 'srd__',
      driverOrder: ['indexeddb', 'sqlite', 'websql']
    }),
    HttpClientModule,
    ComponentsModule,
    StoreModule.forRoot(reducers, {metaReducers})
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: RouteReuseStrategy, useClass: IonicRouteStrategy},
    WebView,
    AppVersion,
    Camera,
    File,
    FilePath,
    FileTransfer,
    FileOpener,
    InAppBrowser,
    Network,
    AppMinimize
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
}
